package com.videoweb.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.List;
import java.util.Set;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 角色实体类
 * </p>
 *
 * @author lmr
 * @since 2025-05-17
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("role")
public class Role implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    private String name;

    private String roleKey;

    private String description;

    private LocalDateTime createdAt;

    private LocalDateTime updatedAt;

    @TableField(exist = false)
    /** 角色菜单权限 */
    private Set<String> permissions;

    @TableField(exist = false)
    /** 菜单组 */
    private List<Long> menuIds;

    @TableField(exist = false)
    /** 角色状态（0正常 1停用） */
    private String status;

    @TableField(exist = false)
    /** 角色排序 */
    private Integer roleSort;

    @TableField(exist = false)
    /** 备注 */
    private String remark;
}
